package com.shangma.controller;

import com.shangma.jian.JianMapper;
import com.shangma.nong.NongMapper;
import com.shangma.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("transfer")
    public String transfer(int fromId, int toId, double money){
        userService.transfer(fromId,toId,money);
        return "success";
    }

}
